package data.nanjing.expo.models.domain.trade;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;

/**
 * 存储用户的服务属性值，如果多选服务属性值，要存多条。根据属性值搜索时根据user_id分组（group by）
 *
 * @author ChanJi
 * @create 2018-06-08 18:03
 **/
public class UserServiceAttr {
    private Integer id;
    /**
     * 用户id
     */
    private Integer userId;
    /**
     * 服务id
     */
    private Integer serviceId;
    /**
     * 服务属性值id
     */
    private Integer serviceAttrId;
    /**
     * 具体的属性值
     */
    private String serviceAttrValue;
    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date gmtCreate;

    /**
     * 修改时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date gmtModify;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getServiceId() {
        return serviceId;
    }

    public void setServiceId(Integer serviceId) {
        this.serviceId = serviceId;
    }

    public Integer getServiceAttrId() {
        return serviceAttrId;
    }

    public void setServiceAttrId(Integer serviceAttrId) {
        this.serviceAttrId = serviceAttrId;
    }

    public String getServiceAttrValue() {
        return serviceAttrValue;
    }

    public void setServiceAttrValue(String serviceAttrValue) {
        this.serviceAttrValue = serviceAttrValue;
    }

    public Date getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(Date gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public Date getGmtModify() {
        return gmtModify;
    }

    public void setGmtModify(Date gmtModify) {
        this.gmtModify = gmtModify;
    }

    @Override
    public String toString() {
        return "UserServiceAttr{" +
                "id=" + id +
                ", userId=" + userId +
                ", serviceId=" + serviceId +
                ", serviceAttrId=" + serviceAttrId +
                ", serviceAttrValue='" + serviceAttrValue + '\'' +
                ", gmtCreat=" + gmtCreate +
                ", gmtModify=" + gmtModify +
                '}';
    }
}
